<?php
include("dynamicContent.php");
autorizacionHome();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>KVM Page - Log in</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<link href="default.css" rel="stylesheet" type="text/css" media="all" />
        <script language="javascript" type="text/javascript" src="md5.js"> </script>
    
	<script language="JavaScript">
<!--


function validar(){
	
	var error = 0;
	if (!verificarVacio(document.forms["login"]["password"])){
		//document.getElementById("pass").innerHTML = "Se debe escribir una contraseña";
		error = 1;
	}
	else {
		document.getElementById("pass").innerHTML = "";
	}
	if (!verificarVacio(document.forms["login"]["usuario"])){
		//document.getElementById("usua").innerHTML = "Se debe escribir un nombre de usuario";
				error = 1;
	}
	else {
		document.getElementById("usua").innerHTML = "";
	}
	return error;

	
	
}
function verificarVacio(valor)
{
if(valor.value.replace(/ /g, '') == '')
{
valor.focus();
valor.select();
return false;
}
else
return true;
}

-->
</script>
	</head>
	
	<body>

		<div id="wrapper">
		
			<div id="logo">
				<?php tituloSubtituloLoginPage();  ?>
			</div>
			
			<div id="page" class="round">
			
			
				
				<div id="splash">
						<?php splash();  ?>
				</div>
				
				<div id="wrapper2" class="round">
				
					
					
					<div style="margin: 10px; padding: 10px; width:920px" id="content" class="round">
<center>					
						<h1>Log in</h1>
								   
						<p><strong>Please digit the required information to continue. Thanks!</strong></p>

  <form name="login" method="post" style="margin:0;" action="Login.php">
  <label class="labels"> <h3>Username</h3> </label>
  <input style="width:200px;" class="cajas" id="usuario" name="usuario" type="text"> </input><br />
    <label class="labels" id="usua"> </label>
  <h2> </h2>
  <label class="labels"> <h3>Password</h3> </label>
  <input class="cajas" style="width:200px;" id="password" name="password" type="password"> </input><br />
  <input id="passMD5" name="passMD5" type="hidden"> </input>
    <label class="labels" id="pass"> </label>
 
<br />

  <input style="background-color: #0a8dbd; border:hidden; font-size:18px; color:#FFF" type="submit" name="login" class="button"  value="     Log in    "  onClick="if (validar() == 0){
  document.getElementById('passMD5').value = calcMD5(document.getElementById('password').value);
   this.form.submit(); }" > </input><br />
  <label class="labels" id="resultados"> </label>
  <br />
</form>
		
</center>
<script language="javascript" type="text/javascript" >  document.login.usuario.focus();</script>
					
					<!-- End Content -->
					</div>
			
					<div style="clear: both"></div>
			
				<!-- End Wrapper 2 -->
				</div>
				
			<!-- End Page -->
			</div>
		
		<!-- End Wrapper -->
		</div>
		
		<div id="footer">
			<?php  piePagina();  ?>
		</div>
		
		
	</body>
	
</html>
